package com.zappee.puremvc
{
	import com.zappee.puremvc.control.command.*;
	
	import org.puremvc.as3.interfaces.IFacade;
	import org.puremvc.as3.patterns.facade.Facade;	

	public class ApplicationFacade extends Facade implements IFacade
	{

		public static const APP_STARTUP:String = "AppStartUp";
		
		public static const APP_START_COMPLETE:String = "appstartcomplete";		

		
		public static function getInstance() : ApplicationFacade
		{

			if ( instance == null ) instance = new ApplicationFacade( );

			return instance as ApplicationFacade;

		}		
		
		override protected function initializeController():void
		{
			super.initializeController();

			registerCommand(APP_STARTUP, StartUpCommand); 
			
			
		}

		public function startup( app:Main ):void
		{			
			sendNotification( ApplicationFacade.APP_STARTUP, app ) ;
		}
		
	}
}